package com.c.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.c.entity.Setmeal;
import com.c.entity.User;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author wangxiangli
 * @create 2022-12-23-22:24
 */
@Repository
public interface SetmealMapper extends BaseMapper<Setmeal> {

    //设置套餐和检查组多对多关系
    void setSetmealAndCheckGroup(Map<String, Integer> map);
    //根据套餐ID获取关联的检查组ID
    List<Integer> findCheckItemIdsBySetmealId(Integer id);
    //清理当前套餐关联的检查项，操作中间关系表t_setmeal_checkgroup表
    void deleteAssocication(Integer id);
    //根据套餐ID统计预约使用该套餐数据量
    long findCountByCheckSetmealId(Integer id);

    List<Map<String, Object>> findSetmealCount();
}
